package com.repast.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.repast.common.ServerResponse;
import com.repast.dao.DeskMapper;
import com.repast.pojo.Desk;
import com.repast.service.IDeskService;

@Service
public class DeskServiceImpl implements IDeskService{

	@Autowired
	private DeskMapper deskMapper;
	
	public ServerResponse selectDeskList(){
		List<Desk> list = deskMapper.selectDeskList();
		if(list.size()==0){
			return ServerResponse.createByErrorMessage("当前餐厅还没有添加桌子");
		}
		return ServerResponse.createBySuccess(list);
	}
}
